package part10;

/**
 * @author wcj
 * @Date 2021/5/19 17:39
 * @Version 1.0
 */
public class Part106 {

    public Content content() {

        /**
         * 匿名内部类
         */
        return new Content() {
            private int i = 10;

            @Override
            public int value() {
                return i;
            }
        };
    }

    public static void main(String[] args) {
        Part106 part106 = new Part106();
        part106.content();
    }
}

interface Content {

    /**
     * value
     *
     * @return
     */
    int value();
}
